<div class="sidebar-box">
  <h3 class="heading"><%= gettext "Featured Posts" %></h3>
  <div class="post-entry-sidebar">
    <ul>
      <%= for post <- list_featured_posts() do %>
      <li>
        <a href="<%= Routes.post_path(@conn, :show, post.slug) %>">
          <img src="<%= post.cover || Routes.static_path(@conn, "/images/placeholder.jpg") %>" alt="<%= post.title %>" class="mr-4">
          <div class="text">
            <h4><%= post.title %></h4>
            <div class="post-meta">
              <span class="mr-2"><%= format_date(post.date || post.inserted_at) %></span>
            </div>
          </div>
        </a>
      </li>
      <% end %>
    </ul>
  </div>
</div>
